/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardgame.game.filters;

import cardgame.game.*;

/**
 *
 * @author Carl
 */
public class MonsterManaTypeCardFilter extends ClassCardFilter{

    public MonsterManaTypeCardFilter(Mana manaType){
        super(MonsterCard.class);
        this.manaType = manaType;
    }
    private Mana manaType;

    @Override
    public boolean isValid(Card card){
        if(super.isValid(card)){
            for(Mana monsterManaType : ((MonsterCard) card).getManaTypes()){
                if(monsterManaType == manaType){
                    return true;
                }
            }
        }
        return false;
    }
    
    
}
